home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Media / HyperText Stacks Folder / HyperText / background_3223.txt < prev    next >
Encoding:
Text File  |  1988-01-01  |  4.8 KB  |  218 lines

  1. -- background: 3223 from stack: in
  2. -- bmap block id: 2943
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   put script of field "holder" into field "index"
  9. end opencard
  10.  
  11. on newcard
  12.   ask "What is the title of this card?"
  13.   put it into field title
  14. end newcard
  15.  
  16.  
  17. -- part 2 (field)
  18. -- low flags: 00
  19. -- high flags: 6007
  20. -- rect: left=155 top=27 right=303 bottom=493
  21. -- title width / last selected line: 0
  22. -- icon id / first selected line: 0 / 0
  23. -- text alignment: 0
  24. -- font id: 3
  25. -- text size: 12
  26. -- style flags: 0
  27. -- line height: 16
  28. -- part name: 
  29. ----- HyperTalk script -----
  30. on mousewithin
  31.   --
  32.   --hypertext technique by Steve Drazga, ART Incorporated
  33.   --if you use this in your scripts please include these 2 lines.
  34.   --
  35.   --
  36.   global selectedWord
  37.   if selection is not empty then  --something was selected
  38.     put selection into SelectedWord
  39.  
  40.     if space is in selection then  --the user selected more than 1 word
  41.       click at loc of target       --so we will clear the selection
  42.       exit mousewithin             --and exit to wait for another selection
  43.     end if
  44.  
  45.     find selectedWord in field "index"  --check to see if word is indexed
  46.     if the result is empty then         --if it is valid, we will
  47.       visual dissolve to inverse        --go to the card with the
  48.       visual dissolve                   --same name
  49.       go card selectedWord
  50.  
  51.       if the result is not empty then  --just in case card has been deleted
  52.         answer "Can't find link. Create a new one?" with "Yes" or "No"
  53.         if it is "Yes" then
  54.           domenu "New Card"
  55.           set the name of this card to selectedWord
  56.         else click at loc of target
  57.       end if
  58.  
  59.     else
  60.       answer "Do you want to create a new link?" with "Yes" or "No"
  61.       if it is "Yes" then CreateNewLink
  62.       else click at loc of target
  63.     end if
  64.   end if
  65. end mousewithin
  66.  
  67.  
  68. on CreateNewLink
  69.   global selectedWord
  70.   put selectedWord&"*" into selection
  71.   get script of field "holder"
  72.   put return&selectedWord after it
  73.   set script of field "holder" to it
  74.   domenu "New Card"
  75.   set the name of this card to selectedWord
  76. end CreateNewLink
  77.  
  78.  
  79.  
  80.  
  81.  
  82. -- part 8 (button)
  83. -- low flags: 00
  84. -- high flags: 2000
  85. -- rect: left=457 top=302 right=328 bottom=494
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 1012 / 1012
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Return
  94. ----- HyperTalk script -----
  95. on mouseUp
  96.   visual effect dissolve to inverse
  97.   visual effect dissolve
  98.   go back
  99. end mouseUp
  100.  
  101.  
  102.  
  103. -- part 9 (field)
  104. -- low flags: 81
  105. -- high flags: 0007
  106. -- rect: left=4 top=44 right=334 bottom=130
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 0
  110. -- font id: 3
  111. -- text size: 12
  112. -- style flags: 0
  113. -- line height: 16
  114. -- part name: index
  115. ----- HyperTalk script -----
  116. on mousedown
  117.   set locktext of target to false
  118.   click at the clickloc
  119.   click at the clickloc
  120.   put selection into selectedWord
  121.   set locktext of target to true
  122.  
  123.   if selectedWord is not empty then
  124.     visual dissolve to inverse
  125.     visual dissolve
  126.     go card selection
  127.   end if
  128. end mousedown
  129.  
  130.  
  131.  
  132.  
  133.  
  134. -- part 11 (button)
  135. -- low flags: 00
  136. -- high flags: A003
  137. -- rect: left=143 top=306 right=327 bottom=265
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 1
  141. -- font id: 0
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: Show Index
  146. ----- HyperTalk script -----
  147. on mouseUp
  148.   if the short name of the target is "Show Index" then
  149.     set visible of field "index" to true
  150.     set name of target to "Hide Index"
  151.   else
  152.     set visible of field "index" to false
  153.     set name of target to "Show Index"
  154.   end if
  155. end mouseUp
  156.  
  157.  
  158.  
  159. -- part 12 (field)
  160. -- low flags: 00
  161. -- high flags: 0004
  162. -- rect: left=116 top=3 right=22 bottom=358
  163. -- title width / last selected line: 0
  164. -- icon id / first selected line: 0 / 0
  165. -- text alignment: 0
  166. -- font id: 0
  167. -- text size: 12
  168. -- style flags: 0
  169. -- line height: 16
  170. -- part name: title
  171.  
  172.  
  173. -- part 13 (field)
  174. -- low flags: 81
  175. -- high flags: 0000
  176. -- rect: left=260 top=162 right=186 bottom=381
  177. -- title width / last selected line: 0
  178. -- icon id / first selected line: 0 / 0
  179. -- text alignment: 0
  180. -- font id: 3
  181. -- text size: 12
  182. -- style flags: 0
  183. -- line height: 16
  184. -- part name: holder
  185. ----- HyperTalk script -----
  186. Information
  187. ART
  188. HyperCard
  189. Developer
  190. sticky
  191. HyperStation
  192. GEnie
  193. CIS
  194. Drazga
  195. Macintosh
  196.  
  197.  
  198. -- part 14 (button)
  199. -- low flags: 00
  200. -- high flags: 2000
  201. -- rect: left=302 top=306 right=330 bottom=336
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 2478 / 2478
  204. -- text alignment: 1
  205. -- font id: 0
  206. -- text size: 12
  207. -- style flags: 0
  208. -- line height: 16
  209. -- part name: 
  210. ----- HyperTalk script -----
  211. on mouseUp
  212.   visual dissolve to inverse
  213.   visual dissolve
  214.   go card "information"
  215.   if the result is not empty then go first card
  216. end mouseUp
  217.  
  218.